package Main;



import Component.Board;
import Global.GlobalGameOption;
import java.awt.GraphicsEnvironment;
import java.awt.Point;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.sound.sampled.AudioInputStream;
import javax.swing.JFrame;
import javax.swing.UIManager;

public class PlayScreen extends JFrame {

	AudioInputStream currentSound;

	public PlayScreen() {
		setTitle("GameOfWar");
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (Exception ex) {
			Logger.getLogger(PlayScreen.class.getName()).log(Level.SEVERE, null, ex);
		}
		setDefaultCloseOperation(EXIT_ON_CLOSE);

		GlobalGameOption.getOption().readXML();
		boolean isFullScreen = GlobalGameOption.getOption().isFullScreen;

		Point resolution = GlobalGameOption.RESOLUTION[GlobalGameOption.getOption().resolution];

		setSize(resolution.x, resolution.y + 20);
		getContentPane().add(new Board());
		if (isFullScreen) {
			//fullscreen
			setUndecorated(true);
			GraphicsEnvironment.getLocalGraphicsEnvironment().
					getDefaultScreenDevice().
					setFullScreenWindow(this);
		}
		
		setResizable(false);
		setVisible(true);

		validate();
	}

	public static void main(String[] args) {
		PlayScreen playScreen = new PlayScreen();
	}
}